package com.fram.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.fram.bean.admin.android.category.response.CategoryWithChildrenResponse;
import com.fram.entity.ProjectCategory;

public interface ProjectCategoryMapper {

	int deleteByPrimaryKey(Long id);

	int insert(ProjectCategory record);

	int insertSelective(ProjectCategory record);
	//分类详情
	ProjectCategory selectByPrimaryKey(@Param("id") Long id);

	int updateByPrimaryKeySelective(ProjectCategory record);

	int updateByPrimaryKey(ProjectCategory record);
	//一二级 展示
	List<ProjectCategory> list(@Param("level") Integer level, @Param("parentId") Long parentId);
	
	int deleteByParentId(Long parentId);
	/**查询刚新增的  id**/
	ProjectCategory selectByName(@Param("CategoryName") String CategoryName);
	
	List<ProjectCategory> selectByParentId(Long parentId);
	
	// android 展示 分类
	List<CategoryWithChildrenResponse> listWithChildren(@Param("distributorId") Long distributorId);
	
}